/**
 * Converter
 *
 * @author Chris Pratt
 *
 * 12/15/2011
 */
package com.anodyzed.onyx.type;

/**
 * Implementations of this Interface are registered with the 
 * {@link ConverterFactory} to convert bi-directionally between two types. 
 *  
 * The {@code convert} method should recognize either type as input and return 
 * the opposite time on output.
 */
public interface Converter {

  /**
   * Convert the supplied Object from its initial format to the expected resulting format.
   *
   * @param from The Object to convert from 
   * @param to The Class to convert to 
   * @return The converted Object
   */
   <T> T convert(Object from,Class<T> to);

} //#Converter
